Conversation
|
|
||
| ## Purpose | ||
|
|
||
| The goal of `rules_shell` is to make working with shell scripts in Bazel more robust and reproducible, similar to how Bazel handles other languages like Go (`rules_go`) or Python (`rules_python`). |
There was a problem hiding this comment.
Thanks for taking a stab at this, but I fear that we don't really live up to this promise just yet. This ruleset is more or less a faithful port of the formerly native shell rules, it's not (yet) more robust or reproducible.
There is an active proposal for integrating ctx.actions.run_shell with rules_shell as well as providing a PATH of hermetic shell tools. I would like to wait for that to be implemented before we claim this.
There was a problem hiding this comment.
Is there any README.md that you'd be able to add to give some indication to how rules_shell is supposed to be used?
There was a problem hiding this comment.
@filmil
Thanks for your response
Sorry I'm not sure who you are asking
In general, this merge request was mostly intended to highlight that rules_shell isn't well documented. In particular, it is unclear [at least to a fool like me] what rules_shell is intending to achieve.
I strongly suspect that that team who wrote rules_shell did have a clear intent and do understand what rules_shell all about. - It would really help others to document this even minimally. It might even help the experts who do understand to stay on track :)
There was a problem hiding this comment.
The question was for @fmeum . It would be nice if a maintainer would bootstrap a README.md with main points to know about the rule set.
| name = "hello", | ||
| srcs = ["hello.sh"], | ||
| data = [":greeting.txt"], | ||
| deps = ["@bash//:bin/bash"], |
There was a problem hiding this comment.
I don't think this could be realized as the script needs some shebang that would run first. If we want it to be truly hermetic, we would need to involve a launcher binary, a simple dep wouldn't help.
| Please note that rules_shell depends on bash outside of the Bazel sandbox | ||
|
|
||
| ``` | ||
| _DEFAULT_SHELL_PATHS = { |
There was a problem hiding this comment.
We should mention that these are the default paths, but that you can register your own toolchains and/or set BAZEL_SH.
No description provided.